package com.xxchat.entity.enums;

import lombok.Getter;

import java.util.Objects;

/**
 * @author Waicc
 */

@Getter
public enum SysVersionFileTypeEnum {
    LOCAL(0, "本地"),
    OUTER_LINK(1, "外链");

    private final Integer type;
    private final String desc;

    public static SysVersionFileTypeEnum getByType(Integer type) {
        for (SysVersionFileTypeEnum e : SysVersionFileTypeEnum.values()) {
            if (Objects.equals(e.type, type)) {
                return e;
            }
        }
        return null;
    }

    SysVersionFileTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

}
